<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/12/13 0013
 * Time: 下午 9:46
 */
namespace frontend\controllers;
use common\models\info\Category;
use frontend\component\FrontendBaseController;
use frontend\service\ArticleService;
use Yii;
use yii\web\Controller;
class SearchController extends FrontendBaseController
{
    public $layout = "/main";
    public function actionIndex(){
        $result = ArticleService::getDataType();
        $types = Category::findAll('');
        return $this->render('index',[
            'data' => $result,
            'types'=>$types
        ]);
    }
}